const px2rem = require('postcss-pxtorem')

module.exports = {
  chainWebpack: config => {
    config.module
      .rule('svg-sprite')
      .use('svgo-loader')
      .loader('svgo-loader')
  },

  css: {
    extract: false,
    loaderOptions: {
      postcss: {
        plugins: [
          px2rem({
            rootValue: 72,
            propList: ['*']
          })
        ]
      }
    }
  }
}
